package com.lanmaoly.cunzheng.weather;

/**
 * 第一天
 *
 * @author
 */
public class FirstWeather implements Observer, DisplayElement {

    private float a;
    private float b;
    private float c;
    private Subject weatherData;

    public FirstWeather(Subject weatherData) {
        this.weatherData = weatherData;
        weatherData.registObserver(this);
    }

    @Override
    public void display() {
        System.out.println("温度:" + a + "湿度:" + b + "气温:" + c);
    }

    @Override
    public void update(float a, float b, float c) {
        this.a = a;
        this.b = b;
        this.c = c;
        display();
    }
}
